Optimal. Leaf size=169 \[ 2 b \sqrt {d} \sqrt {f} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )+2 \sqrt {d} \sqrt {f} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x}-i b \sqrt {d} \sqrt {f} n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )+i b \sqrt {d} \sqrt {f} n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2505, 211,
2423, 4940, 2438, 209} \begin {gather*} -i b \sqrt {d} \sqrt {f} n \text {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )+i b \sqrt {d} \sqrt {f} n \text {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )+2 \sqrt {d} \sqrt {f} \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{x}+2 b \sqrt {d} \sqrt {f} n \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right )-\frac {b n \log \left (d f x^2+1\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 211
Rule 2423
Rule 2438
Rule 2505
Rule 4940
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^2} \, dx &=2 \sqrt {d} \sqrt {f} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x}-(b n) \int \left (\frac {2 \sqrt {d} \sqrt {f} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{x}-\frac {\log \left (1+d f x^2\right )}{x^2}\right ) \, dx\\ &=2 \sqrt {d} \sqrt {f} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x}+(b n) \int \frac {\log \left (1+d f x^2\right )}{x^2} \, dx-\left (2 b \sqrt {d} \sqrt {f} n\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{x} \, dx\\ &=2 \sqrt {d} \sqrt {f} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x}-\left (i b \sqrt {d} \sqrt {f} n\right ) \int \frac {\log \left (1-i \sqrt {d} \sqrt {f} x\right )}{x} \, dx+\left (i b \sqrt {d} \sqrt {f} n\right ) \int \frac {\log \left (1+i \sqrt {d} \sqrt {f} x\right )}{x} \, dx+(2 b d f n) \int \frac {1}{1+d f x^2} \, dx\\ &=2 b \sqrt {d} \sqrt {f} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )+2 \sqrt {d} \sqrt {f} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x}-i b \sqrt {d} \sqrt {f} n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )+i b \sqrt {d} \sqrt {f} n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 221, normalized size = 1.31 \begin {gather*} 2 a \sqrt {d} \sqrt {f} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )+2 b \sqrt {d} \sqrt {f} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (n-n \log (x)+\log \left (c x^n\right )\right )-\frac {a \log \left (1+d f x^2\right )}{x}-\frac {b \left (n+\log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x}+2 b d f n \left (-\frac {i \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )\right )}{2 \sqrt {d} \sqrt {f}}+\frac {i \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\right )}{2 \sqrt {d} \sqrt {f}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.14, size = 547, normalized size = 3.24
method | result | size |
risch | \(-\frac {b \ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right )}{x}-\frac {2 b d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) n \ln \left (x \right )}{\sqrt {d f}}+\frac {2 b d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) \ln \left (x^{n}\right )}{\sqrt {d f}}-\frac {b n \ln \left (d f \,x^{2}+1\right )}{x}+\frac {2 b n d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-b n \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1+x \sqrt {-d f}\right )+b n \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1-x \sqrt {-d f}\right )-b n \sqrt {-d f}\, \dilog \left (1+x \sqrt {-d f}\right )+b n \sqrt {-d f}\, \dilog \left (1-x \sqrt {-d f}\right )-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d f \,x^{2}+1\right )}{2 x}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d f \,x^{2}+1\right )}{2 x}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (d f \,x^{2}+1\right )}{2 x}+\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (d f \,x^{2}+1\right )}{2 x}-\frac {b \ln \left (c \right ) \ln \left (d f \,x^{2}+1\right )}{x}+\frac {2 b \ln \left (c \right ) d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-\frac {\ln \left (d f \,x^{2}+1\right ) a}{x}+\frac {2 a d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}\) | \(547\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c x^{n} \right )}\right ) \log {\left (d f x^{2} + 1 \right )}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________